<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>青年公寓项目 - 后台管理</title>
	<link rel="stylesheet" href="${pageContext.request.contextPath}/css/admin.css">
	<link rel="stylesheet" href="${pageContext.request.contextPath}/lib/font-awesome/css/font-awesome.css">
	<style type="text/css">
		a:hover{
			cursor: pointer;
		}
	</style>
</head>
<body>
	<div class="header">
		<h1><a href="#">青年公寓项目</a></h1>
		<div class="user">
			<a href="#">${user}用户</a>
			<a href="${pageContext.request.contextPath}/user/exit">退出</a>
		</div>
	</div>
	<div class="main">
		<ul class="left-side">
			<li class="menu-title active" onclick="changeBar(this)">
				<a href="#">
					<i class=" fa fa-users"></i>&nbsp;&nbsp;公寓管理
				</a>
			</li>
			<li class="sub-menu">
				<ul class="depart">
					<li class="active">
						<a onclick="changPage('${pageContext.request.contextPath}/view/houselist.jsp',this)">
							<i class="fa fa-circle"></i>&nbsp;&nbsp;房屋信息
						</a>
					</li>
					<li>
						<a onclick="changPage('${pageContext.request.contextPath}/lc/lcList?index=1',this)">
							<i class=" fa fa-circle-thin"></i>&nbsp;&nbsp;租赁合同
						</a>
					</li>
					<li>
						<a onclick="changPage('${pageContext.request.contextPath}/lessee/lesseeList?index=1',this)">
							<i class=" fa fa-circle-thin"></i>&nbsp;&nbsp;租户信息
						</a>
					</li>
					<!-- <li>
						<a target="pageBox" href="#">
							<i class=" fa fa-circle-thin"></i>&nbsp;&nbsp;房租信息
						</a>
					</li> -->
	
				</ul>
			</li>
			<li class="menu-title" onclick="changeBar(this)">
				<a href="#">
					<i class=" fa fa-file-text"></i>&nbsp;&nbsp;服务管理
				</a>
			</li>
			<li class="sub-menu">
				<ul class="depart">
					<li class="active">
						<a onclick="changPage('${pageContext.request.contextPath}/listLogistics?index=1',this)">
							<i class=" fa fa-circle-thin"></i>&nbsp;&nbsp;后勤人员
						</a>
					</li>
					<li>
						<a onclick="changPage('${pageContext.request.contextPath}/listFlatrepair?index=1',this)">
							<i class=" fa fa-circle-thin"></i>&nbsp;&nbsp;修缮记录
						</a>
					</li>
					<li>
						<a onclick="changPage('${pageContext.request.contextPath}/listFlatplay?index=1',this)">
							<i class=" fa fa-circle-thin"></i>&nbsp;&nbsp;公寓活动
						</a>
					</li>
	
				</ul>
			</li>
			<li class="menu-title" onclick="changeBar(this)">
				<a href="#" >
					<i class=" fa fa-sitemap"></i>&nbsp;&nbsp;管理员
				</a>
			</li>
			<li class="sub-menu">
				<ul class="menu depart">
					<li class="active">
						<a onclick="changPage('${pageContext.request.contextPath}/listRole?index=1',this)">
							<i class=" fa fa-circle-thin"></i>&nbsp;&nbsp;角色管理
						</a>
					</li>
					<li>
						<a onclick="changPage('${pageContext.request.contextPath}/listUser?index=1',this)">
							<i class=" fa fa-circle-thin"></i>&nbsp;&nbsp;用户管理
						</a>
					</li>
				</ul>
			</li>
		</ul>
		<div class="right-side" style="padding:20px 50px;">
			
			<iframe name="pageBox" src="${pageContext.request.contextPath}/view/houselist.jsp" id="pageBox"></iframe>
			<div class="footer">
				智游教育 ©2018 河南智游臻龙教育科技有限公司
			</div>
		</div>
	</div>
	<script type="text/javascript">
		function changeBar(e){
			removeBar()
			e.className = "menu-title active"
		}
		
		function removeBar(){
			var ts = document.getElementsByClassName("menu-title")
			for(var i=0 ; i<ts.length ; i++){
				ts[i].className="menu-title"
			}
		}
		function changPage(e,ts){
			removeClass(ts.parentNode.parentNode)
			ts.children[0].className = "fa fa-circle"
			ts.parentNode.className = "active"
			var pageBox = document.getElementById("pageBox")
			pageBox.src = e 
		}
		
		function removeClass(e){
			var li = e.getElementsByTagName('li')
			for(var j=0; j<li.length; j++){
				li[j].className = ""
				li[j].getElementsByTagName('i')[0].className="fa fa-circle-thin"
			}
		}
	</script>
</body>
</html>